<blockquote class="layui-elem-quote">分类:<{$cat['cat_title']}></blockquote>
<form class="layui-form">
  <input type="hidden" name="id" value="<{$info['id']}>" />
  <div class="layui-form-item">
    <label class="layui-form-label">标题</label>
    <div class="layui-input-block">
      <input type="text" name="title" lay-verify="required" value="<{$info['title']}>" placeholder="请输入标题" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">规格</label>
    <div class="layui-input-block">
      <input type="text" name="spec" lay-verify="required" value="<{$info['spec']}>" placeholder="请输入规格" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">售价</label>
    <div class="layui-input-block">
      <input type="text" name="rmb" lay-verify="required" value="<{$info['rmb']}>" placeholder="请输入人民币售价" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">库存</label>
    <div class="layui-input-block">
      <input type="text" name="stock" lay-verify="required" value="<{$info['stock']}>" placeholder="请输入库存" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">属性</label>
    <div class="layui-input-block">
      <{volist name='attr' id='v'}>
      <div class="layui-col-xs3" style="margin-right:10px;">
      <{php}>$arr = explode(",",$v['selectvalue']);<{/php}>
      <{if $v['selectvalue']}>
        <select name="attr[<{$v['title']}>]">
            <option value="">请选择<{$v['title']}></option>
          <{volist name="arr" id="val"}>
              <option value="<{$val}>" <{if isset($info_attr[$v['title']])}>selected<{/if}>><{$val}></option>
          <{/volist}>
        </select>
      <{else}>
        <input type="text" class="layui-input" name="attr[<{$v['title']}>]" value="<{if isset($info_attr[$v['title']])}><{$info_attr[$v['title']]}><{/if}>" placeholder="<{$v['title']}>"  />
      <{/if}>
      </div>
      <{/volist}>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">描述</label>
    <div class="layui-input-block">
      <input type="text" name="description" value="<{$info['description']}>"  placeholder="请输入商品简单描述" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">开关</label>
    <div class="layui-input-block">
        <select name="status">
            <{volist name="status" id="v"}>
          <option value="<{$key}>" <{if $key==$info['status']}>selected<{/if}>><{$v}></option>
            <{/volist}>
        </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">缩略图</label>
    <div class="layui-input-block">
      <input type="hidden" name="pic" value="<{$info['pic']}>" />
      <button type="button" class="layui-btn layui-btn-default mypic">上传图片</button>
      <div id="pic"><{if $info['pic']}><div style="width:100px;float:left;"><i onclick="close_pic(this)" class="layui-icon layui-unselect layui-tab-close" style="float:right;cursor:pointer;">ဆ</i><br><img width="100" src="<{$info['pic']}>" style="margin-right:10px;"></div><{/if}></div>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">相册</label>
    <div class="layui-input-block">
      <input type="hidden" name="pics" value="<{$info['pics']}>" />
      <button type="button" class="layui-btn mypics" >多图片上传</button>
      <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
        预览图：
        <div class="layui-upload-list" id="pics">
          <{php}>$arr = explode(",",$info['pics']);<{/php}>
          <{volist name='arr' id='v'}>
          <{if $info['pics']}>
            <div style="display:inline-block;margin-right:10px;"><i onclick="close_pics(this)" class="layui-icon layui-unselect layui-tab-close" style="float:right;cursor:pointer;">ဆ</i><br><img width="100" height="100" src="<{$v}>" style="margin-right:10px;"></div>
          <{/if}>
          <{/volist}>
        </div>
     </blockquote>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">内容</label>
    <div class="layui-input-block" style="border: 1px solid #ccc;">
      <div id="wangeditorbar" style="border-bottom: 1px solid #ccc;"></div>
      <div id="wangeditor"><{:htmlspecialchars_decode($info['content'])}></div>
    </div>
    <!-- <div class="layui-input-block">
        <textarea name="content" lay-verify="content" id="layui_textarea_index" placeholder="请输入内容" class="layui-textarea"><{:htmlspecialchars_decode($info['content'])}></textarea>
    </div> -->
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="form">立即提交</button>
    </div>
  </div>
</form>
<script>
$().ready(function(){
  layui.form.render('select');
});
</script>
